package cn.edu.sdjzu.xg.eagle.dao;

import cn.edu.sdjzu.xg.eagle.entity.Teacher;
import cn.edu.sdjzu.xg.eagle.util.Condition;
import cn.edu.sdjzu.xg.eagle.util.Pagination;

import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

public class TeacherService {
    private static final TeacherDao teacherDao = TeacherDao.getInstance();

    public static TeacherService getInstance() {
        return null;
    }

    /**
     * 根据条件查询教师列表
     * @param conditionList 查询条件列表
     * @return 符合条件的教师集合
     * @throws SQLException 数据库操作异常
     */
    public Collection<Teacher> findAll(List<Condition> conditionList) throws SQLException {
        return teacherDao.findAll(conditionList);
    }

    /**
     * 根据条件和分页信息查询教师列表
     * @param conditionList 查询条件列表
     * @param pagination 分页信息
     * @return 符合条件的教师集合
     * @throws SQLException 数据库操作异常
     */
    public Collection<Teacher> findAll(List<Condition> conditionList, Pagination pagination) throws SQLException {
        return teacherDao.findAll(conditionList);
    }
}